//定义Mongoose模式和模型
const mongoose = require('mongoose');
// 定义一个Schema
const Schema = mongoose.Schema;

const subType = new Schema({
    username:{ type: String, required: false },
    uid:{type: String, required: true},
    phoneNum:{ type: String, required: false },
    email:{ type: String, required: false },
    subType:{ type: String, required: true },
    bqMoney:{ type: Number, required: true },
    subNum:{ type: Number, required: false },
    startDate:{ type: Date, required: false },
    endDate:{ type: Date, required: false },
    expireDate:{ type: String, required: false },
    subId:{ type: String, required: false },
    subscripte_type:{ type: String, required: false },
    subRAM:{type: Number, required: false},
},{ strict: true })

const subTypeModel = mongoose.model('sub',subType)

module.exports = subTypeModel;

